# https://leetcode.cn/problems/best-time-to-buy-and-sell-stock/description/?envType=problem-list-v2&envId=array
from typing import List


class Solution:
    def maxProfit(self, prices: List[int]) -> int:
        small = min(prices)
        small_index = prices.index(small)
        big_value = max(prices[small_index:])
        return prices.index(big_value) + 1


if __name__ == '__main__':
    s = Solution()
    print(s.maxProfit([7, 1, 5, 3, 6, 4]))
